home *** CD-ROM | disk | FTP | other *** search
/ Immoral Angel 1 / Immoral Angel 1.iso / mac / MSTR / PROGRAM / MOVIE4.DIR / 00116.ls < prev    next >
Encoding:
Text File  |  1997-07-11  |  3.1 KB  |  129 lines

  1. on startMovie
  2.   global poponoff, packagenum, whichview, status, startTime, fileName, photonum, photonummax, selectedvideonum, cursorwait
  3.   cursor(cursorwait)
  4.   set poponoff to 0
  5.   set whichview to "info"
  6.   set status to EMPTY
  7.   set startTime to ticks()
  8.   set photonum to 1
  9.   set photonummax to 29
  10.   photoview(0)
  11.   set selectedvideonum to 0
  12.   set fileName to "MOVIE4"
  13. end
  14.  
  15. on button
  16.   global status, bgmonoff
  17.   if status <> EMPTY then
  18.     beepsound()
  19.     return 0
  20.   end if
  21.   set buttonname to item 1 of the name of cast the castNum of sprite clickOn()
  22.   repeat while stillDown()
  23.     if rollOver(clickOn()) then
  24.       set the castNum of sprite clickOn() to the number of member (buttonname & ",down")
  25.     else
  26.       set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  27.     end if
  28.     updateStage()
  29.   end repeat
  30.   set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  31.   updateStage()
  32.   if rollOver(clickOn()) then
  33.     puppetSound(bgmonoff)
  34.     updateStage()
  35.     return 1
  36.   else
  37.     return 0
  38.   end if
  39. end
  40.  
  41. on button2
  42.   global bgmonoff
  43.   set buttonname to item 1 of the name of cast the castNum of sprite clickOn()
  44.   repeat while stillDown()
  45.     if rollOver(clickOn()) then
  46.       set the castNum of sprite clickOn() to the number of member (buttonname & ",down")
  47.     else
  48.       set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  49.     end if
  50.     updateStage()
  51.   end repeat
  52.   set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  53.   updateStage()
  54.   if rollOver(clickOn()) then
  55.     puppetSound(bgmonoff)
  56.     updateStage()
  57.     return 1
  58.   else
  59.     return 0
  60.   end if
  61. end
  62.  
  63. on npbutton
  64.   global status, bgmonoff
  65.   set which to "0,0"
  66.   if status <> EMPTY then
  67.     beepsound()
  68.     return which
  69.   end if
  70.   set spcenter to (the right of sprite clickOn() - the left of sprite clickOn()) / 2
  71.   set x to 0
  72.   repeat while stillDown()
  73.     if rollOver(clickOn()) then
  74.       set mh to mouseH() - the left of sprite clickOn()
  75.       if mh < spcenter then
  76.         set the castNum of sprite clickOn() to the number of member "prevDown"
  77.         set x to -1
  78.       else
  79.         if mh > spcenter then
  80.           set the castNum of sprite clickOn() to the number of member "nextDown"
  81.           set x to 1
  82.         end if
  83.       end if
  84.     else
  85.       set the castNum of sprite clickOn() to the number of member "nextPrev,up"
  86.     end if
  87.     updateStage()
  88.   end repeat
  89.   set the castNum of sprite clickOn() to the number of member "nextPrev,up"
  90.   updateStage()
  91.   if rollOver(clickOn()) then
  92.     set which to "1," & x
  93.     puppetSound(bgmonoff)
  94.     updateStage()
  95.     return which
  96.   else
  97.     set which to "0," & x
  98.     return which
  99.   end if
  100. end
  101.  
  102. on beepsound
  103.   global bgmonoff, beepnum
  104.   puppetSound(string(beepnum))
  105.   updateStage()
  106. end
  107.  
  108. on wait t
  109.   set waittime to ticks() + (t * 60)
  110.   repeat while ticks() < waittime
  111.     nothing()
  112.   end repeat
  113. end
  114.  
  115. on idle
  116.   global startTime, fileName
  117.   checktimeout()
  118.   if fileName = "MAIN" then
  119.     exit
  120.   end if
  121.   set runningtime to ticks() - startTime
  122.   if runningtime > (7 * 60 * 60) then
  123.     set startTime to ticks()
  124.     if random(5) = 2 then
  125.       bomb()
  126.     end if
  127.   end if
  128. end
  129.